home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_319 / cnewssrc / cnews.orig.lzh / h / libc.h < prev    next >
C/C++ Source or Header  |  1989-06-27  |  3KB  |  85 lines

  1.  
  2. #ifndef LIBC_H
  3. #define LIBC_H
  4. /*
  5.  * declarations of (supposedly) standard C library functions and types.
  6.  * we don't declare functions that once returned int but may now return void
  7.  * to avoid fatal but spurious compilation errors.  VOID is an attempt to deal
  8.  * with this transition.  sprvalue is similar.
  9.  *
  10.  * The function declarations need to be prototyped to give ansi compilers
  11.  * less gastric distress.
  12.  */
  13.  
  14. #ifndef VOID
  15. #define VOID void
  16. #endif
  17. #ifndef sprvalue
  18. /*#define sprvalue char *    /* for stupid archaic 4BSD */
  19. #define sprvalue int
  20. #endif
  21.  
  22. /* Unix system calls */
  23. /* signal types: tailor to suite local tastes */
  24. typedef VOID (*sigret_t)();
  25. typedef VOID (*sigarg_t)();
  26.  
  27. #ifdef A_STABLE_WORLD
  28. extern VOID _exit();
  29. extern int access(), chown(), fork(), link(), mkdir(), umask(), unlink(), wait(
  30. ;
  31. extern int alarm();            /* really unsigned? */
  32. extern int getuid(), geteuid(), getgid(), getegid();
  33. extern int setuid(), setgid();
  34. extern int gethostname();
  35. extern int execv(), execl(), execve(), execle();
  36. #endif                    /* A_STABLE_WORLD */
  37. extern time_t time();            /* sys/timeb.h? */
  38.  
  39. extern int errno;            /* errno.h */
  40. extern char **environ;
  41.  
  42. /* C library */
  43. #ifdef A_STABLE_WORLD
  44. extern int strcmp(), strncmp(), strlen();    /* strings.h */
  45. #endif                    /* A_STABLE_WORLD */
  46. extern char *strcpy(), *strcat(), *strncpy(), *strncat();    /* strings.h */
  47. extern char *index(), *rindex();    /* strings.h */
  48. extern char *memcpy();            /* memory.h */
  49.  
  50. #ifdef A_STABLE_WORLD
  51. extern int fflush(), fputs(), ungetc();    /* stdio.h */
  52. extern int fread(), fwrite(), fseek();    /* stdio.h */
  53. extern int pclose();            /* stdio.h */
  54. extern VOID rewind();            /* stdio.h */
  55. extern VOID exit();            /* stdio.h */
  56. #endif                    /* A_STABLE_WORLD */
  57. extern FILE *popen();            /* stdio.h */
  58. #ifdef __STDC__
  59. extern int printf(char *fmt, ...), fprintf(FILE *, char *fmt, ...); /* stdio.h 
  60. /
  61. extern sprvalue sprintf(char *buf, char *fmt, ...);        /* stdio.h */
  62. #else                    /* __STDC__ */
  63. extern int printf(), fprintf();        /* stdio.h */
  64. extern sprvalue sprintf();        /* stdio.h */
  65. #endif                    /* __STDC__ */
  66.  
  67. /* these unfortunately cannot be relied upon to be in the right header */
  68. extern struct passwd *getpwnam();    /* pwd.h */
  69. extern struct group *getgrnam();    /* grp.h */
  70. extern char *ctime();            /* time.h */
  71.  
  72. extern long atol();
  73. extern char *mktemp();
  74. extern char *getenv();
  75.  
  76. #ifdef A_STABLE_WORLD
  77. extern int putenv(), system();
  78. extern int getopt();
  79. #endif                    /* A_STABLE_WORLD */
  80. extern int optind;
  81. extern char *optarg;
  82.  
  83. #include "alloc.h"            /* ugh */
  84. #endif                    /* LIBC_H */
  85.